<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>文件分类系统</title>
    <link rel="stylesheet" href="/static/css/style.css">
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head>

<body>
    <!-- 错误提示弹窗 -->
    <div id="error-dialog" class="dialog">
        <div class="dialog-content">
            <div class="dialog-header">
                <h3>提示信息</h3>
                <button onclick="closeErrorDialog()">×</button>
            </div>
            <div class="dialog-body">
                <div id="error-message"></div>
            </div>
            <div class="dialog-footer">
                <button onclick="closeErrorDialog()">
                    确定
                </button>
            </div>
        </div>
    </div>

    <div class="container">
        <h1>文件分类系统</h1>

        <div class="main-content">
            <div class="left-panel">
                <div class="form-group">
                    <label>年份：</label>
                    <div id="year" class="checkbox-group"></div>
                </div>

                <div class="form-group">
                    <label>省份：</label>
                    <div class="checkbox-controls">
                        <button type="button" onclick="selectAllProvinces()">全选</button>
                        <button type="button" onclick="invertProvinces()">反选</button>
                    </div>
                    <div id="province" class="checkbox-group"></div>
                </div>

                <div class="form-group">
                    <label>城市：</label>
                    <div class="checkbox-controls">
                        <button type="button" onclick="selectAllCities()">全选</button>
                        <button type="button" onclick="invertCities()">反选</button>
                    </div>
                    <div id="city" class="checkbox-group"></div>
                </div>

                <div class="form-group">
                    <label>年级：</label>
                    <div id="grade" class="checkbox-group"></div>
                </div>

                <div class="form-group">
                    <label>学科：</label>
                    <div id="subject" class="checkbox-group"></div>
                </div>

                <div class="form-group">
                    <label>源目录：</label>
                    <input type="text" id="sourceDir">
                    <button onclick="selectSourceDir()">选择目录</button>
                </div>

                <div class="form-group">
                    <label>目标目录：</label>
                    <input type="text" id="targetDir">
                    <button onclick="selectTargetDir()">选择目录</button>
                </div>

                <button id="startBtn" onclick="startClassify()">开始分类</button>
            </div>

            <div class="right-panel">
                <div class="progress-container">
                    <h3>处理进度</h3>
                    <div class="progress-bar">
                        <div class="progress" id="progress"></div>
                    </div>
                    <div id="progress-text">0%</div>
                </div>

                <div class="log-container">
                    <h3>处理日志</h3>
                    <div id="log"></div>
                </div>
            </div>
        </div>
    </div>

    <script src="/static/js/main.js"></script>
</body>

</html>